package com.xielx.mynovel.slice;

import com.xielx.httpclikent.MyHttpClient;
import com.xielx.mynovel.ResourceTable;
import com.xielx.mynovel.client.QiMaoClient;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Button;
import ohos.agp.components.Component;
import ohos.agp.utils.Color;
import ohos.agp.window.dialog.ToastDialog;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;

public class BootPageSlice extends AbilitySlice {
    HiLogLabel LABEL = new HiLogLabel(HiLog.LOG_APP, 0x00001, getClass().getSimpleName());

    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        setUIContent(ResourceTable.Layout_ability_boot_page);
        presentForResult(new ConfirmSlice(), intent, 0);
    }

    @Override
    protected void onResult(int requestCode, Intent resultIntent) {
        super.onResult(requestCode, resultIntent);
        if (0 == requestCode) {
            if ("yes".equals(resultIntent.getStringParam("proxy"))) {
                MyHttpClient.initProxy("https://m.122.gov.cn:18980/risx/zwt/ohs/proxy");
            }
            QiMaoClient.init(this);
        }
    }
}
